# import paramiko
# def restart(index):
#     try:
#         client = paramiko.SSHClient()
#         client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
#         if index == 1:
#             client.connect(hostname='47.94.167.208', port=22, username='root', password='*LhJdmgBzA9iHH%A')
#         elif index == 2:
#             client.connect(hostname='121.40.127.140', port=22, username='root', password='yinwenlu123456789.')
#         elif index == 3:
#             client.connect(hostname='121.199.2.54', port=22, username='root', password='yinwenlu123456789.')
#         stdin, stdout, stderr = client.exec_command('supervisorctl restart web')
#         res = stdout.read().decode('utf-8')
#
#         client.close()
#         return res
#     except:
#         return False